/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package Entity;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 *
 * @author Cyrax
 */
@Entity
@Table(name = "Contact", catalog = "EasyTickets", schema = "dbo")
@NamedQueries({
    @NamedQuery(name = "Contact.findAll", query = "SELECT c FROM Contact c"),
    @NamedQuery(name = "Contact.findByCtID", query = "SELECT c FROM Contact c WHERE c.ctID = :ctID"),
    @NamedQuery(name = "Contact.findByFirstName", query = "SELECT c FROM Contact c WHERE c.firstName = :firstName"),
    @NamedQuery(name = "Contact.findByCtDate", query = "SELECT c FROM Contact c WHERE c.ctDate = :ctDate"),
    @NamedQuery(name = "Contact.findByStatus", query = "SELECT c FROM Contact c WHERE c.status = :status")})
public class Contact implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "CtID", nullable = false)
    private Integer ctID;
    @Column(name = "FirstName", length = 50)
    private String firstName;
    @Lob
    @Column(name = "YourEmail", length = 1073741823)
    private String yourEmail;
    @Lob
    @Column(name = "Message", length = 1073741823)
    private String message;
    @Column(name = "CtDate")
    @Temporal(TemporalType.TIMESTAMP)
    private Date ctDate;
    @Column(name = "Status")
    private Boolean status;

    public Contact() {
    }

    public Contact(Integer ctID) {
        this.ctID = ctID;
    }

    public Integer getCtID() {
        return ctID;
    }

    public void setCtID(Integer ctID) {
        this.ctID = ctID;
    }

    public String getFirstName() {
        return firstName;
    }

    public void setFirstName(String firstName) {
        this.firstName = firstName;
    }

    public String getYourEmail() {
        return yourEmail;
    }

    public void setYourEmail(String yourEmail) {
        this.yourEmail = yourEmail;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public Date getCtDate() {
        return ctDate;
    }

    public void setCtDate(Date ctDate) {
        this.ctDate = ctDate;
    }

    public Boolean getStatus() {
        return status;
    }

    public void setStatus(Boolean status) {
        this.status = status;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (ctID != null ? ctID.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Contact)) {
            return false;
        }
        Contact other = (Contact) object;
        if ((this.ctID == null && other.ctID != null) || (this.ctID != null && !this.ctID.equals(other.ctID))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "Entity.Contact[ctID=" + ctID + "]";
    }

}
